package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotWayPriceMapper;
import com.gaohe.hotal.domain.HotWayPrice;
import com.gaohe.hotal.service.IHotWayPriceService;

/**
 * 价格方案设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotWayPriceServiceImpl implements IHotWayPriceService 
{
    @Autowired
    private HotWayPriceMapper hotWayPriceMapper;

    /**
     * 查询价格方案设置
     * 
     * @param wayPriceId 价格方案设置主键
     * @return 价格方案设置
     */
    @Override
    public HotWayPrice selectHotWayPriceByWayPriceId(Long wayPriceId)
    {
        return hotWayPriceMapper.selectHotWayPriceByWayPriceId(wayPriceId);
    }

    /**
     * 查询价格方案设置列表
     * 
     * @param hotWayPrice 价格方案设置
     * @return 价格方案设置
     */
    @Override
    public List<HotWayPrice> selectHotWayPriceList(HotWayPrice hotWayPrice)
    {
        return hotWayPriceMapper.selectHotWayPriceList(hotWayPrice);
    }

    /**
     * 新增价格方案设置
     * 
     * @param hotWayPrice 价格方案设置
     * @return 结果
     */
    @Override
    public int insertHotWayPrice(HotWayPrice hotWayPrice)
    {
        hotWayPrice.setCreateTime(DateUtils.getNowDate());
        return hotWayPriceMapper.insertHotWayPrice(hotWayPrice);
    }

    /**
     * 修改价格方案设置
     * 
     * @param hotWayPrice 价格方案设置
     * @return 结果
     */
    @Override
    public int updateHotWayPrice(HotWayPrice hotWayPrice)
    {
        hotWayPrice.setUpdateTime(DateUtils.getNowDate());
        return hotWayPriceMapper.updateHotWayPrice(hotWayPrice);
    }

    /**
     * 批量删除价格方案设置
     * 
     * @param wayPriceIds 需要删除的价格方案设置主键
     * @return 结果
     */
    @Override
    public int deleteHotWayPriceByWayPriceIds(Long[] wayPriceIds)
    {
        return hotWayPriceMapper.deleteHotWayPriceByWayPriceIds(wayPriceIds);
    }

    /**
     * 删除价格方案设置信息
     * 
     * @param wayPriceId 价格方案设置主键
     * @return 结果
     */
    @Override
    public int deleteHotWayPriceByWayPriceId(Long wayPriceId)
    {
        return hotWayPriceMapper.deleteHotWayPriceByWayPriceId(wayPriceId);
    }
}
